$(function () {

})
let URL = "http://localhost:8080";

function myAjax(url, type, data) {
    // judgeUsernameLogin();
    let resutl = null;
    $.ajax({
        url: URL + url,
        type: type,
        data: data,
        async: false,
        dataType: 'json',
        xhrFields: {
            withCredentials: true //允许跨域带Cookie
        },
        success: function (data) {
            resutl = data;
        }
    });
    return resutl;
}